<?php
    apf_require_class("PageHelper");
    $img_path = '/img/home/';
?>
<?php $is_max=0;?>
<?php if(!empty($data['entry_list'])):?>
<?php foreach($data['entry_list'] as $user):?>
<?php $is_max +=1;?>
<div class="container1">
    <table class="tb" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td>姓名<td>工号</td><td>区域</td><td>办公场所</td><td>分类</td><td>部门</td><td>职位</td><td>入职日期</td><td>直属上级</td><td>域帐号</td><td>邮箱地址</td><td>CRM帐号</td>
        </tr>
        <tr>
            <td><?=$user['real_name']?></td>
            <td><?=$user['user_code']?></td>
            <td><?=$user['city_name']?></td>
            <td><?php echo $user['work_space']?$user['work_space']:'';?></td>
            <td><?=$user['bu_name']?></td>
            <td><?=$user['department_name']?></td>
            <td><?=$user['position_name']?></td>
            <td><?=$user['re_entry_date']?></td>
            <td><?=$user['parent_name']?></td>
            <td><?=$user['domain_account']?></td>
            <td><?=$user['office_mail']?></td>
            <td><?=$user['crm_account']?></td>
        </tr>
    </table>
    <?php if($is_max == $max):?><div class="print"></div><?php endif;?>
    <div class="text" style="margin-top: 82px">邮箱/域帐号的初始密码均为：3edc1234；CRM帐号的密码会发送至您的邮箱</div>
    <div class="text">初次登入后请及时登录home修改密码，邮箱帐户请登陆webmail修改密码，并设置密码保护</div>
    <div class="text" style="margin-top: 40px">1.登入电脑后有关IT设置请参考http://itsupport.crop.anjuke.com</div>
    <div class="text">2.IT故障报修:10000@anjuke.com</div>
    <div class="text">3.找前台直拨0</div>
    <div class="text">4.安居客百科：baike.anjuke.com 使用后台账号和密码登陆</div>
    <div class="text">5.安居客员工中心地址：home.corp.anjuke.com</div>
</div>

<?php if($is_max != $max):?>
<div style="page-break-after: always;" id="<?=$is_max.'--'.$max?>"></div>
<?php endif;?>
<?php endforeach;?>
<?php endif;?>
<?php/*入职打印*/ ?>


<?php if(!empty($data['dimiss'])):?>
<?php foreach($data['dimiss'] as $info):?>
<?php $is_max +=1;?>
<div class="container3">
    <div><img src="<?=PageHelper::pure_static_url($img_path . "logo_1.png");?>" class="logo"></div>
    <div>
        <img src="<?=PageHelper::pure_static_url($img_path . "logo_2.png");?>" class="title">
    </div>
    <div class="sub">
        <span>姓名：<?=$info['name']?></span>
        <span>部门：<?=$info['department']?></span>
        <span>职位：<?=$info['position']?></span>
        <span>入职时间：<?=date('Y-m-d',strtotime($info['enter_date']))?></span>
        <span>最后工作日：<?=date('Y-m-d',strtotime($info['last_date']))?></span>
    </div>
    <table class="tb" border="0" cellpadding="0" cellspacing="0">
        <colgroup>
            <col width="10%">
            <col width="80%">
            <col width="10%">
        </colgroup>
        <tr height="40px">
            <td>部门</td>
            <td>办理事项</td>
            <td>经办人</td>
        </tr>
        <tr height="70px">
            <td>工作交接</td>
            <td class="tabS"><?=htmlspecialchars($info['handoff_desc'])?></td>
            <td>
            <?=$info['user_list'][Const_Flow::PHASE_31]['opt_user_name']?>
            <br>
            <?=date('Y-m-d',strtotime($info['user_list'][Const_Flow::PHASE_31]['operate_time']))?></td>
        </tr>
        <tr height="100px">
            <td>直属上级</td>
            <td class="tabS_1" style="line-height: 22px">
                <ul>
                    <li><div class="tb_li">工作交接人：</div><div class="tb_li_d"><?=$info['handoff_user_name']?></div></li>
                    <li><div class="tb_li">交接完成：</div><div class="tb_li_d"><?=$info['superior_re_opinion']?></div></li>
                    <li><div class="tb_li">备注：</div><div class="tb_li_d"><?=htmlspecialchars($info['handoff_re_desc'])?></div></li>
                </ul>
            </td>
            <td>
            <?=$info['user_list'][Const_Flow::PHASE_32]['opt_user_name']?>
            <br>
            <?=date('Y-m-d',strtotime($info['user_list'][Const_Flow::PHASE_32]['operate_time']))?>
            </td>
        </tr>
        <tr height="120px">
            <td>财务部</td>
            <td class="tabS_1" style="line-height: 22px">
                <ul>
                    <li><div class="tb_li">未结清款项：</div><div class="tb_li_d">&nbsp;<?=$info['uncleared_type']?>&nbsp;&nbsp;<?=$info['uncleared_text']?>&nbsp;&nbsp;金额:<?=$info['uncleared_money']?></div></li>
                    <li><div class="tb_li">未结清营销费用：</div><div class="tb_li_d">&nbsp;<?=$info['uncleared_type']?>&nbsp;&nbsp;<?=$info['uncleared_sale_text']?>&nbsp;&nbsp;金额:<?=$info['uncleared_sale_money']?></div></li>
                    <li><div class="tb_li">费用说明：</div><div class="tb_li_d">&nbsp;<?=htmlspecialchars($info['uncleared_desc'])?> </div></li>
                    <li><div class="tb_li">备注：</div><div class="tb_li_d">&nbsp;<?=htmlspecialchars($info['uncleared_bak'])?></div></li>
                </ul>
            </td>
            <td>
            <?=$info['user_list'][Const_Flow::PHASE_33]['opt_user_name']?>
            <br>
            <?=date('Y-m-d',strtotime($info['user_list'][Const_Flow::PHASE_33]['operate_time']))?></td>
        </tr>
        <?php if($info['is_tech']):?>
        <tr height="70px">
            <td>技术部</td>
            <td class="tabS_1" style="line-height: 22px">
                <ul>
                    <li><div class="tb_li">书籍归还：</div><div class="tb_li_d"><?=$info['book_back']?></div></li>
                    <li><div class="tb_li">备注：</div><div class="tb_li_d"><?=htmlspecialchars($info['book_bak'])?></div></li>
                </ul>
            </td>
            <td>
            <?=$info['user_list'][Const_Flow::PHASE_34]['opt_user_name']?>
            <br>
            <?=date('Y-m-d',strtotime($info['user_list'][Const_Flow::PHASE_34]['operate_time']))?></td>
        </tr>
        <?php endif;?>
        <tr height="70px">
            <td>IT部</td>
            <td class="tabS_1" style="line-height: 22px">
                <ul>
                    <li><div class="tb_li">关闭权限：</div><div class="tb_li_d"><?=$info['close_power']?></div></li>
                    <li><div class="tb_li">备注：</div><div class="tb_li_d"><?=htmlspecialchars($info['close_bak'])?></div></li>
                </ul>
            </td>
            <td><?=$info['user_list'][Const_Flow::PHASE_35]['opt_user_name']?>
            <br>
            <?=date('Y-m-d',strtotime($info['user_list'][Const_Flow::PHASE_35]['operate_time']))?></td>
        </tr>
        <tr height="90px">
            <td>行政部</td>
            <td class="tabS_1" style="line-height: 22px">
                <ul>
                    <li><div class="tb_li">收回：</div><div class="tb_li_d"><?=$info['callback_equipment']?></div></li>
                    <li><div class="tb_li">备注：</div><div class="tb_li_d"><?=htmlspecialchars($info['callback_desc'])?></div></li>
                </ul>
            </td>
            <td><?=$info['user_list'][Const_Flow::PHASE_36]['opt_user_name']?>
            <br>
            <?=date('Y-m-d',strtotime($info['user_list'][Const_Flow::PHASE_36]['operate_time']))?></td>
        </tr>
        <tr height="120px">
            <td>人力资源部</td>
            <td class="tabS_1" style="line-height: 22px">
                <ul>
                    <li><div class="tb_li">期权：</div><div class="tb_li_d"><?=$info['option']?></div></li>
                    <li><div class="tb_li">劳动手册：</div><div class="tb_li_d"><?=$info['work_book']?></div></li>
                    <li><div class="tb_li">已办理：</div><div class="tb_li_d"><?=$info['hr_checked']?></div></li>
                    <li><div class="tb_li">备注：</div><div class="tb_li_d"><?=htmlspecialchars($info['hr_bak'])?></div></li>
                </ul>
            </td>
            <td><?=$info['user_list'][Const_Flow::PHASE_37]['opt_user_name']?>
            <br>
            <?=date('Y-m-d',strtotime($info['user_list'][Const_Flow::PHASE_37]['operate_time']))?></td>
        </tr>
    </table>
    <div style="margin-top: 10px;">我确认上述离职相关手续已办理完成，即日起解除与公司的劳动关系。</div>
    <div align="right" style="margin-top: 15px;">员工签名：<input type="text" style="border: none;border-bottom: 1px dashed #000"></div>
    <div align="right">日<em style="margin-right: 2em"></em>期：<input type="text" style="border: none;border-bottom: 1px dashed #000"></div>
<!--endprint-->
    <?php if($is_max == $max):?><div class="print" id="doPrint"></div><?php endif;?>
</div>

<?php if($is_max != $max):?>
<div style="page-break-after: always;" id="<?=$is_max.'--'.$max?>"></div>
<?php endif;?>
<?php endforeach;?>
<?php endif;?>
<?php/*离职打印*/ ?>


<?php if(!empty($data['transfer'])):?>
<?php foreach($data['transfer'] as $transfer):?>
<?php $is_max +=1;?>
<div class="container2">
    <div><img src="<?=PageHelper::pure_static_url($img_path . "logo_1.png");?>" class="logo"></div>

    <div><img src="<?=PageHelper::pure_static_url($img_path . "title.png");?>" class="title"></div>
    <table class="tb" border="0" cellpadding="0" cellspacing="0">
        <colgroup>
            <col width="10%">
            <col width="10%">
            <col width="30%">
            <col width="10%">
            <col width="10%">
            <col width="30%">
        </colgroup>
        <tr height="40px">
            <td colspan="2">姓名</td>
            <td><?=$transfer['name']?></td>
            <td colspan="2">工号</td>
            <td><?=$transfer['code']?></td>
        </tr>
        <tr height="40px">
            <td colspan="2">入职日期</td>
            <td><?=$transfer['enter_date']?></td>
            <td colspan="2">部门</td>
            <td><?=$transfer['department']?></td>
        </tr>
        <tr height="40px" >
            <td colspan="2">岗位异动类别</td>
            <td colspan="4" class="tabS"><?=$transfer['transfer_type']?>&nbsp;&nbsp;<?=$transfer['transfer_reason']?></td>
        </tr>
        <tr height="40px">
            <td colspan="2">薪资异动原因</td>
            <td colspan="4" class="tabS"><?=$transfer['salary_reason']?>&nbsp;&nbsp;<?=$transfer['salary_reason_remark']?></td>
        </tr>
        <tr height="40px">
            <td colspan="2">确定生效日期</td>
            <td colspan="4" class="tabS"><?=$transfer['plan_date']?></td>
        </tr>
        <tr height="40px">
            <td rowspan="2" colspan="2">部门异动情况</td>
            <td colspan="4">异动前<span style="margin-left: 250px">异动后</span></td>
        </tr>
        <tr height="197px">
            <td colspan="2" style="line-height: 30px;vertical-align: top;padding-top: 20px">
                <ul>
                    <li><div class="tb_li">职位：</div><div class="tb_li_d"><?=$transfer['position']?></div></li>
                    <li><div class="tb_li">部门：</div><div class="tb_li_d"><?=$transfer['department']?></div></li>
                    <li><div class="tb_li">职级：</div><div class="tb_li_d">&nbsp;<?=$transfer['before_pm_level']?></div></li>
                    <li><div class="tb_li">直属主管：</div><div class="tb_li_d">&nbsp;<?=$transfer['under_leader_before']?></div></li>
                </ul>
            </td>
            <td colspan="2" style="line-height: 30px;vertical-align: top;padding-top: 20px">
                <ul>
                    <li><div class="tb_li">职位：</div><div class="tb_li_d"><?=$transfer['after_position']?></div></li>
                    <li><div class="tb_li">部门：</div><div class="tb_li_d"><?=$transfer['after_department']?></div></li>
                    <li><div class="tb_li">职级：</div><div class="tb_li_d">&nbsp;<?=$transfer['after_pm_level']?></div></li>
                    <li><div class="tb_li">直属主管：</div><div class="tb_li_d">&nbsp;<?=$transfer['under_leader_after']?></div></li>
                    <li><div class="tb_li">上级主管：</div><div class="tb_li_d">&nbsp;<?=$transfer['superior_after']?></div></li>
                </ul>
            </td>
        </tr>
        <tr height="80px">
            <td colspan="2">人力资源意见</td>
            <td colspan="4" class="tabS" style="line-height:30px">
                <div class="tb_li">薪资核定：</div><div class="tb_li_d">&yen;&nbsp;<?=$transfer['hr_salary']?>&nbsp;元</div><br>
                <div class="tb_li">主管：</div><div class="tb_li_d">&nbsp;<?=$transfer['hr_name']?> &nbsp;&nbsp;&nbsp;&nbsp; 经办：&nbsp;<?=$transfer['hrd_name']?></div>
            </td>
        </tr>
        <tr height="40px">
            <td colspan="2">员工签字</td>
            <td colspan="4" class="tabS" style="line-height:30px">
            </td>
        </tr>
    </table>
    <div align="right" style="margin-top: 35px;">员工签名：<input type="text" style="border: none;border-bottom: 1px dashed #000;text-align: center;" value=""></div>
    <div align="right">日<em style="margin-right: 2em"></em>期：<input type="text" style="border: none;border-bottom: 1px dashed #000;text-align: center;" value=""></div>
    <?php if($is_max == $max):?><div class="print"></div><?php endif;?>
</div>

<?php if($is_max != $max):?>
<div style="page-break-after: always;" id="<?=$is_max.'--'.$max?>"></div>
<?php endif;?>
<?php endforeach;?>
<?php endif;?>
<?php/*异动打印*/ ?>

<?php $this->script_block_begin(); ?>
<script type="text/javascript">
/*    $('#doPrint').click(function(){
        bdhtml=window.document.body.innerHTML;
        sprnstr="<!--startprint-->";
        eprnstr="<!--endprint-->";
        prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17);
        prnhtml=prnhtml.substring(1,prnhtml.indexOf(eprnstr));
        window.document.body.innerHTML=prnhtml+'</div>';
        window.print();
        });*/
</script>
<?php $this->script_block_end(); ?>
